<template>
  <van-image  :error-icon="defaultimg" :icon-size="`${size}px`" :style="imgStyle"/>
</template>
<script setup>
import defaultimg from '@/assets/images/common/i_err_img-small.png'
const props = defineProps({
    // 错误图片大小
    size: {
        type:String,
        default: 0,
    },
});
const { size} = toRefs(props);

const imgStyle = computed(() => {
    return {
        width: `${size.value}px`,
        height:`${size.value}px`,
    };
});
</script>
<style lang="scss"></style>
